package cn.com.open.itembank.common.enums;

public enum HaulType {
    /**
     * 本层目标拖拽
     */
    inner(0),
    /**
     * 向上拖拽
     */
    prev(1),
    /**
     *  向下拖拽
     */
    down(2);

    private Integer index;

    HaulType(Integer idx) {
        this.index = idx;
    }

    /**
     * Gets index.
     *
     * @return the index
     */
    public Integer getIndex() {
        return index;
    }

    public static HaulType fromValue(Integer v) {
        for (HaulType c : HaulType.values()) {
            if (c.getIndex() == v) {
                return c;
            }
        }
        return null;
    }
}
